<?php

defined('MYLITS') ? '' : exit('No direct script access allowed');

/**
 * @version     1.0.0
 * @package     mylits engine
 * @license     GNU General Public License version 3
 * @author      Arfan Fudyartanto D N <arfan@mylits.com> - http://engine.mylits.com
 */

$query['get_menu_list'] = "
SELECT * FROM `mylits_core_menus`";

$query['get_menu_item_list'] = "
SELECT
    IFNULL(c.`core_menus_items_translations_label`, b.`core_menus_items_label`) AS `name`,
    b.`core_menus_items_menu_path_alias` AS `path`,
    b.`core_menus_items_parent_id` AS `parent`,
    b.`core_menus_items_id` AS `id`,
    b.`core_menus_items_class` AS `class`
FROM
    `#__core_menus` a
JOIN `#__core_menus_items` b ON (a.core_menus_id = b.core_menus_items_menu_id)
LEFT JOIN `#__core_menus_items_translations` c ON (b.`core_menus_items_id` = c.`core_menus_items_translations_item_id`)
LEFT JOIN `#__core_languages` d ON (c.`core_menus_items_translations_language_id` = d.`core_languages_id`)
WHERE a.`core_menus_id` = ? AND d.`core_languages_code` = '?'
--search--
ORDER BY b.`core_menus_items_order` ASC";
?>
